<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="shortcut icon" href="../photo/网站.png" type="image/x-icon">
    <title>五育系统学生端</title>
    <link href="../css/show.css" rel="stylesheet">
    <script src="../js/untils/request.js"></script>
    <script src="../js/untils/NORM.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
    <!-- 引入 Vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <script src="../js/untils/request.js"></script>
    <!-- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> -->
    <style>
        .bottom {
            position: fixed;
            /* 固定位置 */
            bottom: 30px;
            /* 距离底部20px */
            right: 10%;
            /* 从左边50%开始 */
            transform: translateX(50%);
            /* 水平居中 */
            z-index: 1000;
            /* 确保在其他元素之上 */
        }
    </style>
</head>

<body>
    <div class="top">
        <div class="container">
            <div class="cover atvImg">
                <div class="atvImg-layer" data-img="http://robindelaporte.fr/codepen/visa-bg-4.jpg"></div>
                <div class="atvImg-layer" data-img="https://pic.imgdb.cn/item/671492b8d29ded1a8c3e2ea7.png"></div>
            </div>
        </div>
        <div class="container">
            <div class="cover atvImg">
                <div class="atvImg-layer" data-img="http://robindelaporte.fr/codepen/visa-bg-4.jpg"></div>
                <div class="atvImg-layer" data-img="https://pic.imgdb.cn/item/6714a6aed29ded1a8c5ec14b.png"></div>
            </div>
        </div>
        <div class="container">
            <div class="cover atvImg">
                <div class="atvImg-layer" data-img="http://robindelaporte.fr/codepen/visa-bg-4.jpg"></div>
                <div class="atvImg-layer" data-img="https://pic.imgdb.cn/item/6714a6bfd29ded1a8c5ed068.png"></div>
            </div>
        </div>
    </div>
    <div id="show">
        <div id="showcontent-1">
            <div>
                <h1>五育发展情况概览💫</h1>
            </div>
            <div class="encharts" width="100%">
                <h2>😁整体情况</h2>
                <div class="imageShow">
                    <canvas id="myChart" width="400" height="200"></canvas>
                    <span class="bottomtext">图1-五育综合标准分</span>
                </div>
                <div class="encharts-text">
                    <h3>说明✍:</h3>
                    <p id="part1Text1">✧</p>
                    <p>✧ 分数越高，图1中彩色的长方形就越长，表明整体评价越高</p>
                    <p style="color: red;">✧ 这一结果可能受到教师评价侧重存在问题等因素的干扰,未来也需要全方面关注</p>
                </div>
            </div>
            <div>
                <h2>😊均衡情况</h2>
                <div class="imageShow">
                    <canvas id="radarChart" width="350" height="350"></canvas>
                    <span>图二-五育发展雷达图</span>
                </div>
                <div class="encharts-text">
                    <h3>说明✍:</h3>
                    <p id="part1Text2"></p>
                    <p>✧ 图2中的五边形的某一顶点越接近边缘，表明该项的评价越高。五边形的颜色越接近绿色，表明发展越均衡</p>
                    <p style="color: red;">✧ 这一结果可能受到教师评价侧重存在问题等因素的干扰,未来也需要全方面关注</p>
                </div>
            </div>
        </div>
        <div id="showcontent-2">
            <div>
                <h1>强项情况分析🌟</h1>
                <p>🔴 这一结果可能受到教师评价侧重存在问题等因素的干扰,未来也需要全方面关注</p>
            </div>
            <div>
                <div style="width: 450px; margin: auto;">
                    <div class="timeline">
                        <div class="timeline-item">
                            <div class="timeline-date">【综合】</div>
                            <div class="card">
                                <p>※ {{strengthContent.total ? strengthContent.total : "暂无强项"}}</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【德育】</div>
                            <div class="card">
                                <h4>※ 德育强项</h4>
                                <p>【二级指标】{{strengthContent.DY.secondshort ? strengthContent.DY.secondshort : "暂无强项" }}
                                </p>
                                <p>【三级指标】{{strengthContent.DY.thirdshort ? strengthContent.DY.thirdshort : "暂无强项" }}
                                </p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【智育】</div>
                            <div class="card">
                                <h4>※ 智育强项</h4>
                                <p>【二级指标】{{strengthContent.ZY.secondshort ? strengthContent.ZY.secondshort : "暂无强项" }}
                                </p>
                                <p>【三级指标】{{strengthContent.ZY.thirdshort ? strengthContent.ZY.thirdshort : "暂无强项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【体育】</div>
                            <div class="card">
                                <h4>※ 体育强项</h4>
                                <p>【二级指标】{{strengthContent.TY.secondshort ? strengthContent.TY.secondshort : "暂无强项" }}
                                </p>
                                <p>【三级指标】{{strengthContent.TY.thirdshort ? strengthContent.TY.thirdshort : "暂无强项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【美育】</div>
                            <div class="card">
                                <h4>※ 美育强项</h4>
                                <p>【二级指标】{{strengthContent.MY.secondshort ? strengthContent.MY.secondshort : "暂无强项" }}
                                </p>
                                <p>【三级指标】{{strengthContent.MY.thirdshort ? strengthContent.MY.thirdshort : "暂无强项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【劳育】</div>
                            <div class="card">
                                <h4>※ 劳育强项</h4>
                                <p>【二级指标】{{strengthContent.LY.secondshort ? strengthContent.LY.secondshort : "暂无强项" }}
                                </p>
                                <p>【三级指标】{{strengthContent.LY.thirdshort ? strengthContent.LY.thirdshort : "暂无强项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="showcontent-3">
            <div>
                <h1>薄弱项情况分析☁️</h1>
            </div>
            <div>
                <div style="width: 450px; margin: auto;">
                    <div class="timeline">
                        <div class="timeline-item">
                            <div class="timeline-date">【综合】</div>
                            <div class="card">
                                <p>※ {{shortContent.total ? shortContent.total : "暂无薄弱项"}}</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【德育】</div>
                            <div class="card">
                                <h4>※ 德育薄弱项</h4>
                                <p>【二级指标】{{shortContent.DY.secondshort ? shortContent.DY.secondshort : "暂无薄弱项" }}</p>
                                <p>【三级指标】{{shortContent.DY.thirdshort ? shortContent.DY.thirdshort : "暂无薄弱项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【智育】</div>
                            <div class="card">
                                <h4>※ 智育薄弱项</h4>
                                <p>【二级指标】{{shortContent.ZY.secondshort ? shortContent.ZY.secondshort : "暂无薄弱项" }}</p>
                                <p>【三级指标】{{shortContent.ZY.thirdshort ? shortContent.ZY.thirdshort : "暂无薄弱项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【体育】</div>
                            <div class="card">
                                <h4>※ 体育薄弱项</h4>
                                <p>【二级指标】{{shortContent.TY.secondshort ? shortContent.TY.secondshort : "暂无薄弱项" }}</p>
                                <p>【三级指标】{{shortContent.TY.thirdshort ? shortContent.TY.thirdshort : "暂无薄弱项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【美育】</div>
                            <div class="card">
                                <h4>※ 美育薄弱项</h4>
                                <p>【二级指标】{{shortContent.MY.secondshort ? shortContent.MY.secondshort : "暂无薄弱项" }}</p>
                                <p>【三级指标】{{shortContent.MY.thirdshort ? shortContent.MY.thirdshort : "暂无薄弱项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                        <div class="timeline-item">
                            <div class="timeline-date">【劳育】</div>
                            <div class="card">
                                <h4>※ 劳育薄弱项</h4>
                                <p>【二级指标】{{shortContent.LY.secondshort ? shortContent.LY.secondshort : "暂无薄弱项" }}</p>
                                <p>【三级指标】{{shortContent.LY.thirdshort ? shortContent.LY.thirdshort : "暂无薄弱项" }}</p>
                                <p>在上述内容的表现，需要进一步努力和提高</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 下载pdf的按钮展示 -->
    <div class="bottom" onclick="downloadpdf()">
        <button> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="pokeball">
                <path stroke="#000" fill="#fe0505"
                    d="m26.425 16.455a10.925 10.925 0 0 1 -10.925 10.925 10.925 10.925 0 0 1 -10.925-10.925 10.925 10.925 0 0 1 10.925-10.925 10.925 10.925 0 0 1 10.925 10.925z">
                </path>
                <path stroke="#000" fill-rule="evenodd" fill="#fff"
                    d="m26.245 17.168c-1.024.744-1.984 1.248-3.282 1.757-4.738 1.84-10.565 1.816-15.271-.06-1.13-.455-2.12-.99-3.042-1.626.387 5.753 5.119 10.207 10.885 10.207 6.491-.256 10.32-5.361 10.71-10.278z">
                </path>
                <path transform="translate(0 -1020.362)" fill-rule="evenodd"
                    d="m26.196 1036.339-.508.406c-.94.682-1.83 1.116-3.088 1.61-4.476 1.737-10.09 1.715-14.535-.055h-.004a15.14 15.14 0 0 1 -2.568-1.32c-.02-.014-.166-.133-.354-.263l-.842 1.431c.04.028-.105.372.11.51.89.577 1.867 1.078 2.912 1.499h.002c4.968 1.98 11.005 2.003 16.004.062h.004c1.337-.525 2.43-1.053 3.537-1.856l-.038-.18-.128-.85-.504-.993z">
                </path>
                <path stroke="#000" fill="#fff"
                    d="m17.976 19.69a2.4 2.4 0 0 1 -2.4 2.4 2.4 2.4 0 0 1 -2.4-2.4 2.4 2.4 0 0 1 2.4-2.4 2.4 2.4 0 0 1 2.4 2.4z">
                </path>
            </svg> <svg xmlns="http://www.w3.org/2000/svg" width="250" viewBox="0 0 451.103 424.198" height="100"
                class="pika">
                <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" stroke="#000" fill="#fff22d"
                    d="m160.524 320.079-46.872-17.64 15.048-20.088s-51.912-16.704-64.439-21.744l42.695-87.12-90.432-8.352-15.12-77.112 180.936 43.56-61.991 108.936 48.6 21.744-26.856 33.48 30.169 20.16z">
                </path>
                <path fill="#e8d031"
                    d="m114.588 302.223 15.048-20.16-.792-.216-.072-.072-.216-.072-.216-.072-.36-.072-.36-.144-.504-.144-.504-.144-.576-.216-.576-.216-.72-.216-.72-.216-.792-.288-.864-.288-.864-.288-.936-.288-1.008-.288-1.007-.36-1.009-.36-1.152-.36-1.08-.36-1.152-.36-1.224-.36-1.224-.432-1.224-.36-1.224-.432-1.295-.432-1.297-.432-1.367-.432-1.369-.504-2.376-.792-.288-.72 16.056 3.888-6.768-12.672 17.064 2.376-3.816-12.312 16.848 5.328-3.312-10.008 30.672 13.752-26.711 33.408 29.735 19.8-10.512 3.744z">
                </path>
                <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" stroke="#000" fill="#e8d031"
                    d="m191.484 383.583s-21.672 21.96-25.632 34.561c-3.96 12.672 37.944-2.16 64.584-25.128 26.712-23.113-38.952-9.433-38.952-9.433zm144.288 0s21.672 21.96 25.631 34.561c3.961 12.672-37.872-2.16-64.583-25.128-26.712-23.113 38.952-9.433 38.952-9.433z">
                </path>
                <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" stroke="#000" fill="#fff22d"
                    d="m179.316 198.399c-12.6-13.176-20.88-36.144-18.072-50.832 3.096-15.912 9.288-31.608 10.368-40.248 1.008-8.64 6.984-26.928 7.272-26.784-16.776-5.4-37.513-15.264-51.48-28.512-13.968-13.176-46.008-42.408-42.696-48.888 3.456-6.696 47.16 7.704 69.048 14.76 21.961 7.056 47.664 28.512 47.448 28.944.145.36 35.424-16.992 68.256-16.272 32.761.648 52.776 9 63.576 15.912-.216-.072 25.489-21.528 47.375-28.584 21.889-7.056 65.592-21.456 69.049-14.76 3.312 6.48-28.729 35.712-42.695 48.888-13.969 13.248-32.113 23.112-48.889 28.512.287-.144 6.119 11.088 7.92 22.32 1.729 11.232 5.039 27.72 9.072 43.416 3.24 12.744-2.305 38.952-16.057 53.136-1.799 2.52 29.305 72 24.984 110.448-4.393 38.448-13.32 66.024-37.225 78.12-23.616 11.952-123.624 5.04-148.607-1.512-22.681-5.976-41.041-32.904-49.681-73.512s31.61-112.968 31.034-114.552z">
                </path>
                <path
                    d="m329.58 95.655c9.937 0 18 7.2 18 16.056s-8.063 16.056-18 16.056c-9.863 0-18-7.2-18-16.056s8.137-16.056 18-16.056zm-120.24 1.152c9.864 0 18 7.2 18 16.056 0 8.784-8.136 15.984-18 15.984-9.936 0-18-7.2-18-15.984 0-8.856 8.064-16.056 18-16.056zm50.832 35.856 4.824 5.04c.576.576 1.225.576 1.872-.072l5.472-5.112c.36-.576.145-.864-.504-.792h-10.8c-1.08.072-1.224.432-.864.936z">
                </path>
                <g stroke="#000">
                    <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" fill="#905744"
                        d="m247.644 161.319c13.824-2.664 18.72-7.488 18.72-7.488s3.672 4.536 15.696 7.344c-15.192 54.432-34.416 1.44-34.416.144z">
                    </path>
                    <path stroke-width=".216"
                        d="m408.995 50.007c14.832-13.968 43.633-40.68 40.465-46.872-1.943-3.888-17.352-.72-34.271 4.032-.504 2.664 3.168 12.528-1.369 26.712-1.584 5.04-3.313 10.656-4.825 16.128zm-284.183-41.184c-19.008-5.544-37.872-10.008-40.104-5.688-3.312 6.48 28.729 35.712 42.696 48.888 2.304 2.16 4.824 4.32 7.632 6.48-1.8-8.784-5.184-20.232-8.208-29.664-2.664-8.424-2.52-15.264-2.016-20.016z">
                    </path>
                    <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" fill="#cc2229"
                        d="m347.075 146.271c8.785 0 15.984 7.488 15.984 16.632s-7.199 16.632-15.984 16.632c-8.784 0-15.984-7.488-15.984-16.632.001-9.144 7.201-16.632 15.984-16.632zm-158.471-5.04c8.784 0 15.983 7.488 15.983 16.632s-7.199 16.56-15.983 16.56-15.984-7.416-15.984-16.56 7.2-16.632 15.984-16.632zm91.368 26.712c-11.305 32.76-24.192 12.384-29.592.36 3.888-3.816 9.144-6.192 14.976-6.192 5.544 0 10.728 2.232 14.616 5.832z">
                    </path>
                    <path stroke-width="2.808" stroke-linejoin="round" stroke-linecap="round" fill="none"
                        d="m266.364 153.615c7.056 6.264 25.776 13.536 32.112.792m-32.112-.792c-7.2 5.76-25.848 13.536-32.184.792">
                    </path>
                </g>
                <path fill="#fff"
                    d="m267.084 132.591c1.656 0 2.952.432 2.952.937 0 .576-1.296 1.008-2.952 1.008-1.584 0-2.88-.432-2.88-1.008 0-.505 1.296-.937 2.88-.937z">
                </path>
                <path stroke-width="3.168" stroke-linejoin="round" stroke-linecap="round" stroke="#000" fill="none"
                    d="m227.052 231.015s7.632 5.112 14.832 32.112c4.392 16.632 11.304 20.376 13.248 24.696 1.943 4.392 4.319 10.584-1.368 7.2-5.688-3.384-7.416-3.024-5.185 1.584 2.305 4.608 1.08 7.488-7.056 1.512-6.048-4.392-5.976.504-4.248 3.024s1.656 9.504-5.472 3.312c-7.057-6.12-9.217-3.6-7.128.792 2.088 4.32 3.743 9.792-7.057 2.232-3.239-2.232-8.063-11.952-12.815-17.208-11.232-12.456-24.265-24.48-28.801-42.336">
                </path>
                <path stroke-width="3.456" stroke-linejoin="round" stroke-linecap="round" stroke="#000" fill="none"
                    d="m308.34 242.679s-6.407 5.976-7.703 31.176c-.864 15.552-6.84 20.16-7.849 24.336-1.008 4.248-2.016 10.152 2.88 6.12 4.824-4.032 6.553-4.104 5.328.432-1.224 4.464.576 6.768 7.272-.072 4.968-4.968 5.903-.648 4.752 1.872-1.152 2.592.432 8.712 6.048 1.944s8.28-4.968 7.128-.72-1.584 9.36 7.416.72c2.664-2.592 5.4-12.096 8.928-17.64 8.352-13.176 18.576-26.208 19.225-42.912">
                </path>
                <path stroke-width=".936" stroke="#000" fill="none"
                    d="m166.068 421.383 12.096-13.32m183.025 13.32-12.098-13.32m-179.279 14.256 15.84-10.728m171.865 10.728-15.84-10.728">
                </path>
                <path fill="#e8d031"
                    d="m405.181 52.815c-13.752 12.528-31.248 21.888-47.449 27.072h-.072c-4.104-7.848-8.424-18.144-11.736-19.224 26.064 3.528 45.864-1.656 59.257-7.848zm-269.569 5.4c14.976 10.512 29.016 17.28 43.776 21.672 4.176-7.848 8.063-14.976 11.376-19.008-26.064 3.528-41.76 3.528-55.152-2.664zm106.273 160.776c1.943 2.304 33.983 9.36 52.344-.144-27.505 38.16-53.713.432-52.344.144z">
                </path>
                <path fill="#fff"
                    d="m335.7 99.471c2.88 0 5.184 2.304 5.184 5.04 0 2.808-2.304 5.04-5.184 5.04-2.808 0-5.112-2.232-5.112-5.04 0-2.736 2.304-5.04 5.112-5.04zm-120.24 1.152c2.809 0 5.112 2.232 5.112 5.04s-2.304 5.04-5.112 5.04c-2.88 0-5.184-2.232-5.184-5.04s2.304-5.04 5.184-5.04z">
                </path>
                <path fill="#e8d031"
                    d="m175.788 249.303c-1.439 8.424-2.304 15.336 10.513 35.784 12.743 20.448 28.728 21.384 28.728 21.384s-6.768-10.368-9.504-14.04-9.792-10.224-14.472-15.984c-2.953-3.168-11.593-13.968-15.265-27.144zm183.241 128.952c-3.6 3.528-7.705 6.552-12.457 8.928-23.616 11.952-123.624 4.968-148.607-1.584-12.528-3.24-23.688-12.96-32.688-27.792 13.104 8.064 32.184 18.576 42.768 19.656 17.353 1.656 38.017-5.112 52.776-4.68 14.76.432 34.561 8.856 56.88 8.856 14.327 0 28.294-.504 41.328-3.384zm1.439-118.152s-2.305 5.544-4.32 9.864c-1.943 4.32-6.48 11.304-8.279 13.68-1.801 2.304-4.824 6.984-5.904 9.144-2.016 4.104-3.528 8.784-5.904 12.6 0 0 4.104-3.744 6.48-6.984 2.305-3.24 8.568-9.936 12.168-15.84 3.599-5.904 5.759-22.464 5.759-22.464z">
                </path>
            </svg> <span class="go">下载pdf</span> <span class="pword">pika</span> <span class="pword2">pika</span>
        </button>
    </div>
    <script src="../js/mouseonclick.js"></script>
    <script src="../js/show.js"></script>
    <script src="../js/myChart.js"></script>
    <script type="module">
        const app = new Vue({
            el: '#show',
            data: {
                // 1. 文本信息
                // 1.1 薄弱项文本分析
                shortContent: {
                    total: "",
                    DY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    ZY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    TY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    MY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    LY: {
                        secondshort: "",
                        thirdshort: ""
                    }
                },
                // 1.2 强项项文本分析
                strengthContent: {
                    total: "",
                    DY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    ZY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    TY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    MY: {
                        secondshort: "",
                        thirdshort: ""
                    },
                    LY: {
                        secondshort: "",
                        thirdshort: ""
                    }
                }
            },
        })

        // 获取指标信息
        var Evaluation = []
        // 获取数据进行初始化
        const httpService = new HttpService('http://60.205.234.107:7512');
        // const httpService = new HttpService('http:localhost:8080');

        var studentId = ''
        var yearAdmission = ''
        // 存放当前同学的信息
        var OnlyStudentList = []
        //存放相关同学成绩
        var studentScores = []
        // 存放拿去成绩的月份
        var monthList = []
        // 存放该学生这几月成绩的平均值
        var ThisStudentAverageList = {}
        // 存放所有学生这几月成绩的平均值
        var AllStudentAverageList = []

        // 存放查询条件
        var queryCondition = { startTime: "", endTime: "" }
        //学生信息
        var studentIfo = {}
        function getTermDates(startYear, gradeTerm) {
            // 解析学年和学期
            const regex = /(\d+)年级(上学期|下学期)/;
            const match = gradeTerm.match(regex);

            if (!match) {
                return null; // 格式错误
            }

            const grade = parseInt(match[1]); // 获取年级
            const term = match[2]; // 获取学期（上学期或下学期）
            // 根据入学年份和年级推算当前学年的年份
            const schoolYear = startYear + grade - 1; // 学年从入学年份开始

            let startMonth, endMonth;

            // 根据学期推算起始和结束月份
            if (term === "上学期") {
                // 上学期：从 9月 到 1月
                startMonth = 9;
                endMonth = 1; // 上学期通常到第二年1月结束
            } else if (term === "下学期") {
                // 下学期：从 3月 到 6月
                startMonth = 3;
                endMonth = 6;
            }

            const startDateYear = startMonth === 9 ? schoolYear : schoolYear + 1; // 上学期年份不变，下学期年份加 1
            const endDateYear = endMonth === 1 ? schoolYear + 1 : schoolYear; // 上学期结束在第二年，下学期保持当前年份

            // 拼接日期，确保月份为两位数
            const startDate = `${startDateYear}-${String(startMonth).padStart(2, '0')}`;
            const endDate = `${endDateYear}-${String(endMonth).padStart(2, '0')}`;

            return {
                startDate,
                endDate
            };
        };

        async function getInfo(sid) {
            return httpService.get(`/students/students/getinfo/${sid}`)
                .then(data => {
                    studentIfo = {
                        scchoolMeaasge: data.scchoolMeaasge,
                        studentclass: data.studentclass,
                        yearAdmission: data.yearAdmission,
                        studentId: data.studentId,

                    }
                })
        };
        // 使用 HttpService 进行请求 -- 获取A学校A年级全部同学的成绩记录
        async function getScoreList() {
            studentId = localStorage.getItem("StudentId");
            await getInfo(studentId);
            const yearAdmission = localStorage.getItem("yearAdmission");// 入学年份
            const Yearstem = localStorage.getItem("Yearstem"); // 学期
            const result = getTermDates(parseInt(yearAdmission), Yearstem);
            queryCondition.startTime = result.startDate;
            queryCondition.endTime = result.endDate;
            return httpService.get(`/studentstandardscores/studentstandardscores/list`)
                .then(data => {
                    data.forEach(element => {
                        if (element.studentId === studentId && element.calculationtime.slice(0, 7) >= queryCondition.startTime && element.calculationtime.slice(0, 7) <= queryCondition.endTime) {
                            OnlyStudentList.push(element)
                            Handlemonth(element)
                        }
                        addStudentScore(element)
                    });
                    showPersonalInfo()
                    contentpart1()
                    // 准备工作 求该生平均值
                    prepareAllStudent()
                    // 获取指标信息
                    getStudentEvaluation()
                })
                .catch(error => {
                    console.error('Error fetching data:', error);
                });
        }
        // 处理时间的函数
        function Handlemonth(data) {
            const time = data.calculationtime.slice(0, 7);
            monthList.push(time)
            // 对 monthList 数组进行排序
            monthList.sort((a, b) => {
                // 将 'YYYY-MM' 格式的字符串转换为 Date 对象进行比较
                return new Date(a) - new Date(b);
            });
        }
        // 信息处理的通用函数Universal function
        function HndleUniversalFunction(data) {
            // 标准九分数
            const firstLevelIndicators = {};
            const secondLevelIndicators = {};
            const thirdLevelIndicators = {};
            var totalIndicator = null;
            // Z分数
            const firstLevelZscores = {};
            const secondLevelZscores = {};
            const thirdLevelZscores = {};
            var totalZscore = null;

            const strandScore = JSON.parse(data.strandScore);
            const zscores = JSON.parse(data.zscores);

            // 遍历标准九分数对象
            for (const [key, value] of Object.entries(strandScore)) {
                const dotCount = key.split('.').length - 1; // 计算点的数量进行判断是几级指标
                if (key === "totalIndicator") {
                    totalIndicator = value; // 处理总指标
                } else if (dotCount === 0) { // 一级指标
                    firstLevelIndicators[key] = value;
                } else if (dotCount === 1) { // 二级指标
                    secondLevelIndicators[key] = value;
                } else if (dotCount === 2) { // 三级指标
                    thirdLevelIndicators[key] = value;
                }
            }

            // 遍历 zscores 对象
            for (const [key, value] of Object.entries(zscores)) {
                const dotCount = key.split('.').length - 1;
                if (key === "totalIndicator") {
                    totalZscore = value;
                } else if (dotCount === 0) {
                    firstLevelZscores[key] = value;
                } else if (dotCount === 1) {
                    secondLevelZscores[key] = value;
                } else if (dotCount === 2) {
                    thirdLevelZscores[key] = value;
                }
            }

            // 返回格式化结果
            const result = {
                strandScore: {
                    firstLevel: firstLevelIndicators,
                    secondLevel: secondLevelIndicators,
                    thirdLevel: thirdLevelIndicators,
                    totalIndicator: totalIndicator,
                },
                zscores: {
                    firstLevel: firstLevelZscores,
                    secondLevel: secondLevelZscores,
                    thirdLevel: thirdLevelZscores,
                    totalZscore: totalZscore
                }
            };

            return result;
            // console.log(result); // 输出结果以供调试
        }
        // 插入新的学生成绩信息
        function addStudentScore(data) {
            const result = HndleUniversalFunction(data)
            const newStudentScore = {
                studentId: data.studentId,
                scores: result
            };
            studentScores.push(newStudentScore);
        }
        // 处理个人信息进行页面展示
        function showPersonalInfo() {
            var Sum = 0, num = 0
            var SumDy = 0, SumZy = 0, SumMy = 0, SumTy = 0, SumLy = 0
            // // console.log("特定学生信息" , OnlyStudentList);

            OnlyStudentList.forEach(element => {
                var result = HndleUniversalFunction(element)
                Sum += result.zscores.totalZscore
                num += 1
                SumDy += result.strandScore.firstLevel[1]
                SumZy += result.strandScore.firstLevel[2]
                SumTy += result.strandScore.firstLevel[3]
                SumMy += result.strandScore.firstLevel[4]
                SumLy += result.strandScore.firstLevel[5]
            });
            // 计算平均值
            const avgDy = SumDy / num;
            const avgZy = SumZy / num;
            const avgTy = SumTy / num;
            const avgMy = SumMy / num;
            const avgLy = SumLy / num;

            // 调用画图函数
            initZ(Sum.toFixed(2));

            // 创建包含平均值的数组
            const firstLevelArray = [avgDy, avgZy, avgTy, avgMy, avgLy].map(value => parseInt(value));
            initradaChart(firstLevelArray);
        }
        // 填写文字的函数
        function contentpart1() {
            const length = monthList.length;
            var evaluationText;
            evaluationText = `✧ 图1表示的是：根据你在${monthList[0]}月至${monthList[length - 1]}月德育、智育、体育、美育、劳育这五个方面发展的整体情况，做出的综合评价。分数的上限是9，下限是1。`;
            document.getElementById('part1Text1').innerText = evaluationText;
            document.getElementById('part1Text2').innerText = evaluationText;
        }

        // 准备工作 ,求当前学生的成绩平均值
        function prepareThisStudent(sid, StudnetData) {
            // console.log("准备学生信息", StudnetData);

            let strandScoreTotal = {
                firstLevel: {},
                secondLevel: {},
                thirdLevel: {},
                totalIndicator: 0
            };

            let zscoresTotal = {
                firstLevel: {},
                secondLevel: {},
                thirdLevel: {},
                totalZscore: 0
            };

            let totalZscoreTotal = 0; // 用于累加每个学生的 totalZscore
            let totalIndicatorTotal = 0; // 用于累加每个学生的 totalIndicator
            const studentCount = StudnetData.length;  // 月份数据数量

            // 遍历每个学生的成绩数据
            StudnetData.forEach(student => {
                // 解析每个学生对应的strandScore和zscores的JSON字符串
                const strandScore = student.scores.strandScore;
                const zscores = student.scores.zscores;

                // 累加strandScore中的每个级别的指标
                Object.entries(strandScore.firstLevel).forEach(([key, value]) => {
                    if (!strandScoreTotal.firstLevel[key]) {
                        strandScoreTotal.firstLevel[key] = 0;
                    }
                    strandScoreTotal.firstLevel[key] += value;
                });

                Object.entries(strandScore.secondLevel).forEach(([key, value]) => {
                    if (!strandScoreTotal.secondLevel[key]) {
                        strandScoreTotal.secondLevel[key] = 0;
                    }
                    strandScoreTotal.secondLevel[key] += value;
                });

                Object.entries(strandScore.thirdLevel).forEach(([key, value]) => {
                    if (!strandScoreTotal.thirdLevel[key]) {
                        strandScoreTotal.thirdLevel[key] = 0;
                    }
                    strandScoreTotal.thirdLevel[key] += value;
                });

                strandScoreTotal.totalIndicator += strandScore.totalIndicator;
                zscoresTotal.totalZscore += zscores.totalZscore;
                // 累加zscores中的每个级别的指标
                Object.entries(zscores.firstLevel).forEach(([key, value]) => {
                    if (!zscoresTotal.firstLevel[key]) {
                        zscoresTotal.firstLevel[key] = 0;
                    }
                    zscoresTotal.firstLevel[key] += value;
                });

                Object.entries(zscores.secondLevel).forEach(([key, value]) => {
                    if (!zscoresTotal.secondLevel[key]) {
                        zscoresTotal.secondLevel[key] = 0;
                    }
                    zscoresTotal.secondLevel[key] += value;
                });

                Object.entries(zscores.thirdLevel).forEach(([key, value]) => {
                    if (!zscoresTotal.thirdLevel[key]) {
                        zscoresTotal.thirdLevel[key] = 0;
                    }
                    zscoresTotal.thirdLevel[key] += value;
                });
            });
            // 计算每个级别的平均值
            const strandScoreAvg = {
                firstLevel: {},
                secondLevel: {},
                thirdLevel: {},
                totalIndicator: 0
            };
            const zscoresAvg = {
                firstLevel: {},
                secondLevel: {},
                thirdLevel: {},
                totalZscore: 0
            };

            // 计算strandScore每个级别的平均值
            Object.entries(strandScoreTotal.firstLevel).forEach(([key, total]) => {
                strandScoreAvg.firstLevel[key] = Math.round(total / studentCount);
            });
            Object.entries(strandScoreTotal.secondLevel).forEach(([key, total]) => {
                strandScoreAvg.secondLevel[key] = Math.round(total / studentCount);
            });
            Object.entries(strandScoreTotal.thirdLevel).forEach(([key, total]) => {
                strandScoreAvg.thirdLevel[key] = Math.round(total / studentCount);
            });

            strandScoreAvg.totalIndicator = Math.round(strandScoreTotal.totalIndicator / studentCount);

            // 计算zscores每个级别的平均值
            Object.entries(zscoresTotal.firstLevel).forEach(([key, total]) => {
                zscoresAvg.firstLevel[key] = (total / studentCount).toFixed(2);
            });
            Object.entries(zscoresTotal.secondLevel).forEach(([key, total]) => {
                zscoresAvg.secondLevel[key] = (total / studentCount).toFixed(2);
            });
            Object.entries(zscoresTotal.thirdLevel).forEach(([key, total]) => {
                zscoresAvg.thirdLevel[key] = (total / studentCount).toFixed(2);
            });

            zscoresAvg.totalZscore = (zscoresTotal.totalZscore / studentCount).toFixed(2);
            // 组织返回的结果
            const StudentAverageList = {
                studentId: sid,
                strandScore: strandScoreAvg,
                zscores: zscoresAvg
            };
            AllStudentAverageList.push(StudentAverageList);
            if (sid == studentIfo.studentId) ThisStudentAverageList = StudentAverageList;
        }

        // 准备工作 , 将学生的成绩数据分组
        function prepareAllStudent() {
            // // console.log(studentScores)
            // 创建一个对象，将每个学生的数据分组
            const studentScoresMap = {};
            studentScores.forEach(student => {
                const studentId = student.studentId;
                if (!studentScoresMap[studentId]) {
                    studentScoresMap[studentId] = [];
                }
                studentScoresMap[studentId].push(student);
            });
            Object.entries(studentScoresMap).forEach(([studentId, studentData]) => {
                prepareThisStudent(studentId, studentData)
            });

            // console.log(AllStudentAverageList)
        }
        // 获取学生评价指标
        async function getStudentEvaluation() {
            try {
                const res = await httpService.get('/indicator/indicator/list');
                // console.log(res);gradeID schoolID
                // console.log(studentIfo);
                if (res.code == 200) {
                    res.data.forEach(item => {
                        if (item.gradeID == studentIfo.yearAdmission && item.schoolID == studentIfo.scchoolMeaasge) {
                            Evaluation.push(item)
                        }
                    })
                    // 薄弱分析
                    shortageOne()
                    shortageTwoThree()
                    // 强项分析
                    strong()
                }
            } catch (error) {
                console.error("请求失败", error);  // 错误处理
            }
        }


        // 一级薄弱项分析
        function shortageOne() {
            // 获取目标学生的分数信息
            const targetStudentId = ThisStudentAverageList.studentId;
            // console.log(targetStudentId);

            const targetStudent = AllStudentAverageList.find(student => student.studentId === targetStudentId);

            const targetTotalScore = targetStudent.strandScore.totalIndicator;

            // 记录一级薄弱项
            const firstLevelWeaknesses = {};

            // 查找与目标学生总分相同的学生
            const relevantStudents = AllStudentAverageList.filter(student =>
                student.strandScore.totalIndicator === targetTotalScore
            );

            // console.log(relevantStudents);

            // 初始化存储一级指标的总和及计数
            const firstLevelTotals = {};
            const firstLevelCounts = {};

            // 计算一级指标的平均值
            relevantStudents.forEach(student => {
                // console.log(student)
                const firstLevelScores = student.strandScore.firstLevel;

                for (const [firstLevelId, score] of Object.entries(firstLevelScores)) {
                    if (!firstLevelTotals[firstLevelId]) {
                        firstLevelTotals[firstLevelId] = 0;
                        firstLevelCounts[firstLevelId] = 0;
                    }
                    firstLevelTotals[firstLevelId] += score;
                    firstLevelCounts[firstLevelId]++;
                }
            });

            // 计算一级指标的平均值并比较
            for (const [firstLevelId, total] of Object.entries(firstLevelTotals)) {
                const averageScore = total / firstLevelCounts[firstLevelId];
                // // console.log(`一级指标${firstLevelId}的平均分: ${averageScore}`);
                if (targetStudent.strandScore.firstLevel[firstLevelId] < averageScore) {
                    firstLevelWeaknesses[firstLevelId] = averageScore.toFixed(2); // 存储薄弱项及其平均分
                }
            }
            // 输出一级薄弱项分析结果
            // console.log("一级薄弱项:", firstLevelWeaknesses);
            var content = '整体上的的薄弱项有';
            Object.keys(firstLevelWeaknesses).forEach(function (key) {
                switch (key) {
                    case '1': content += '"德育", '; break;
                    case '2': content += '"智育", '; break;
                    case '3': content += '"体育", '; break;
                    case '4': content += '"美育", '; break;
                    case '5': content += '"劳育", '; break;
                }
            });

            content += "在这三个方面，要加油努力。"
            app.shortContent.total = content
        }
        // 二三级薄弱项分析
        function shortageTwoThree() {
            // 获取目标学生的分数信息
            const targetStudentId = ThisStudentAverageList.studentId;
            const targetStudent = AllStudentAverageList.find(student => student.studentId === targetStudentId);
            const targetFirstLevelScores = targetStudent.strandScore.firstLevel;
            // 记录薄弱项
            const weaknesses = { secondLevel: {}, thirdLevel: {} };

            // 对于每个一级指标
            for (const [firstLevelId, firstLevelScore] of Object.entries(targetFirstLevelScores)) {
                // 查找与该一级指标分数相同的学生
                const relevantStudents = AllStudentAverageList.filter(student =>
                    student.strandScore.firstLevel[firstLevelId] === firstLevelScore
                );

                // 初始化存储二级指标的总和及计数
                const secondLevelTotals = {};
                const secondLevelCounts = {};

                // 计算二级指标的平均值
                relevantStudents.forEach(student => {
                    const secondLevelScores = student.strandScore.secondLevel;

                    // 只计算当前一级指标对应的二级指标
                    for (const secondLevelId of Object.keys(secondLevelScores)) {
                        if (secondLevelId.startsWith(firstLevelId + '.')) {
                            if (!secondLevelTotals[secondLevelId]) {
                                secondLevelTotals[secondLevelId] = 0;
                                secondLevelCounts[secondLevelId] = 0;
                            }
                            secondLevelTotals[secondLevelId] += secondLevelScores[secondLevelId];
                            secondLevelCounts[secondLevelId]++;
                        }
                    }
                });

                // 计算二级指标的平均值并比较
                for (const [secondLevelId, total] of Object.entries(secondLevelTotals)) {
                    const averageScore = total / secondLevelCounts[secondLevelId];
                    // // console.log(`${secondLevelId} 平均分：${averageScore}`);
                    if (targetStudent.strandScore.secondLevel[secondLevelId] < averageScore) {
                        weaknesses.secondLevel[secondLevelId] = averageScore.toFixed(2); // 存储薄弱项及其平均分
                    }
                }

                // 初始化存储三级指标的总和及计数
                const thirdLevelTotals = {};
                const thirdLevelCounts = {};

                // 计算三级指标的平均值
                relevantStudents.forEach(student => {
                    const thirdLevelScores = student.strandScore.thirdLevel;

                    // 只计算当前一级指标对应的三级指标
                    for (const thirdLevelId of Object.keys(thirdLevelScores)) {
                        if (thirdLevelId.startsWith(firstLevelId + '.')) {
                            if (!thirdLevelTotals[thirdLevelId]) {
                                thirdLevelTotals[thirdLevelId] = 0;
                                thirdLevelCounts[thirdLevelId] = 0;
                            }
                            thirdLevelTotals[thirdLevelId] += thirdLevelScores[thirdLevelId];
                            thirdLevelCounts[thirdLevelId]++;
                        }
                    }
                });

                // 计算三级指标的平均值并比较
                for (const [thirdLevelId, total] of Object.entries(thirdLevelTotals)) {
                    const averageScore = total / thirdLevelCounts[thirdLevelId];
                    // // console.log(`${thirdLevelId} 平均分：${averageScore}`);
                    if (targetStudent.strandScore.thirdLevel[thirdLevelId] < averageScore) {
                        weaknesses.thirdLevel[thirdLevelId] = averageScore.toFixed(2); // 存储薄弱项及其平均分
                    }
                }
            }

            // 分析薄弱项结果的对应关系 --二级薄弱项
            const secondLevelll = weaknesses.secondLevel
            const thirdLevelll = weaknesses.thirdLevel

            // 二级指标文字分析
            Object.entries(secondLevelll).forEach(function (item) {
                const [indicatorId, value] = item;
                // 查找对应的指标信息
                const indicatorInfo = Evaluation.find(info => info.treeCode === indicatorId);
                switch (indicatorInfo.category) {
                    case "德育":
                        app.shortContent.DY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "智育":
                        app.shortContent.ZY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "体育":
                        app.shortContent.TY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "美育":
                        app.shortContent.MY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "劳育":
                        app.shortContent.LY.secondshort += indicatorInfo.description + "  "
                        break;
                }
            });

            // 三级指标文字分析
            // 遍历 thirdLevelll，将数据填充到 shortContent 对应字段
            Object.entries(thirdLevelll).forEach(function (item) {
                const [indicatorId, value] = item;
                // 查找对应的指标信息
                const indicatorInfo = Evaluation.find(info => info.treeCode === indicatorId);

                switch (indicatorInfo.category) {
                    case "德育":
                        app.shortContent.DY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "智育":
                        app.shortContent.ZY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "体育":
                        app.shortContent.TY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "美育":
                        app.shortContent.MY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "劳育":
                        app.shortContent.LY.thirdshort += indicatorInfo.description + "  "
                        break;
                }
            });
        }
        // 强项分析
        function strong() {
            // 强项分析结果
            const strengths = {
                firstLevel: {},
                secondLevel: {},
                thirdLevel: {}
            };

            // 获取目标学生的分数
            const targetStudentId = ThisStudentAverageList.studentId;
            const targetStudent = AllStudentAverageList.find(student => student.studentId === targetStudentId);

            // 1. 强项分析一级指标
            const firstLevelStrengths = {};
            const firstLevelStudents = AllStudentAverageList.filter(student => student.strandScore.totalIndicator === targetStudent.strandScore.totalIndicator);

            // 计算一级指标的均分
            firstLevelStudents.forEach(student => {
                const firstLevelScores = student.strandScore.firstLevel;
                for (const [firstLevelId, score] of Object.entries(firstLevelScores)) {
                    if (!firstLevelStrengths[firstLevelId]) {
                        firstLevelStrengths[firstLevelId] = { total: 0, count: 0 };
                    }
                    firstLevelStrengths[firstLevelId].total += score;
                    firstLevelStrengths[firstLevelId].count++;
                }
            });

            // 判断一级指标的强项
            for (const [firstLevelId, { total, count }] of Object.entries(firstLevelStrengths)) {
                const averageScore = total / count;
                const studentScore = targetStudent.strandScore.firstLevel[firstLevelId];

                if (targetStudent.strandScore.totalIndicator >= 7 && targetStudent.strandScore.totalIndicator <= 8) {
                    if (studentScore > averageScore) {
                        strengths.firstLevel[firstLevelId] = averageScore;
                    }
                } else if (targetStudent.strandScore.totalIndicator >= 2 && targetStudent.strandScore.totalIndicator <= 6) {
                    if (studentScore >= 7) {
                        strengths.firstLevel[firstLevelId] = averageScore;
                    }
                }
            }

            // 2. 强项分析二级指标
            const secondLevelStrengths = {};

            for (const [firstLevelId, score] of Object.entries(targetStudent.strandScore.firstLevel)) {
                const relevantSecondLevelStudents = AllStudentAverageList.filter(student =>
                    student.strandScore.firstLevel[firstLevelId] === score);

                // 只有在总分为7-8时才计算均分
                if (targetStudent.strandScore.totalIndicator >= 7 && targetStudent.strandScore.totalIndicator <= 8) {
                    relevantSecondLevelStudents.forEach(student => {
                        const secondLevelScores = student.strandScore.secondLevel;
                        for (const [secondLevelId, secondScore] of Object.entries(secondLevelScores)) {
                            if (!secondLevelStrengths[secondLevelId]) {
                                secondLevelStrengths[secondLevelId] = { total: 0, count: 0 };
                            }
                            secondLevelStrengths[secondLevelId].total += secondScore;
                            secondLevelStrengths[secondLevelId].count++;
                        }
                    });

                    // 判断强项
                    for (const [secondLevelId, { total, count }] of Object.entries(secondLevelStrengths)) {
                        const averageScore = total / count;
                        if (targetStudent.strandScore.secondLevel[secondLevelId] > averageScore) {
                            strengths.secondLevel[secondLevelId] = averageScore;
                        }
                    }
                } else {
                    // 在总分为2-6时判断二级指标
                    if (score >= 7) {
                        for (const [secondLevelId, secondScore] of Object.entries(targetStudent.strandScore.secondLevel)) {
                            if (secondScore >= 7) {
                                strengths.secondLevel[secondLevelId] = "强项";
                            }
                        }
                    }
                }
            }

            // 3. 强项分析三级指标
            const thirdLevelStrengths = {};

            for (const [firstLevelId, score] of Object.entries(targetStudent.strandScore.firstLevel)) {
                const relevantThirdLevelStudents = AllStudentAverageList.filter(student =>
                    student.strandScore.firstLevel[firstLevelId] === score);

                // 只有在总分为7-8时才计算均分
                if (targetStudent.strandScore.totalIndicator >= 7 && targetStudent.strandScore.totalIndicator <= 8) {
                    relevantThirdLevelStudents.forEach(student => {
                        const thirdLevelScores = student.strandScore.thirdLevel;
                        for (const [thirdLevelId, thirdScore] of Object.entries(thirdLevelScores)) {
                            if (!thirdLevelStrengths[thirdLevelId]) {
                                thirdLevelStrengths[thirdLevelId] = { total: 0, count: 0 };
                            }
                            thirdLevelStrengths[thirdLevelId].total += thirdScore;
                            thirdLevelStrengths[thirdLevelId].count++;
                        }
                    });

                    // 判断强项
                    for (const [thirdLevelId, { total, count }] of Object.entries(thirdLevelStrengths)) {
                        const averageScore = total / count;
                        if (targetStudent.strandScore.thirdLevel[thirdLevelId] > averageScore) {
                            strengths.thirdLevel[thirdLevelId] = averageScore;
                        }
                    }
                } else {
                    // 在总分为2-6时判断三级指标
                    if (score >= 7) {
                        for (const [thirdLevelId, thirdScore] of Object.entries(targetStudent.strandScore.thirdLevel)) {
                            if (thirdScore >= 7) {
                                strengths.thirdLevel[thirdLevelId] = "强项";
                            }
                        }
                    }
                }
            }
            // 输出强项分析结果
            // console.log("21008035同学的强项分析:", strengths);
            const firstLevelList = strengths.firstLevel
            const secondLevelList = strengths.secondLevel
            const thirdLevelList = strengths.thirdLevel
            // 一级指标文字描述
            app.strengthContent.total = "整体上的的强项有"
            Object.keys(firstLevelList).forEach(key => {
                switch (key) {
                    case "1":
                        app.strengthContent.total += '"德育", '
                        break;
                    case "2":
                        app.strengthContent.total += '"智育", '
                        break;
                    case "3":
                        app.strengthContent.total += '"体育", '
                        break;
                    case "4":
                        app.strengthContent.total += '"美育", '
                        break;
                    case "5":
                        app.strengthContent.total += '"劳育", '
                        break;
                }
            })
            app.strengthContent.total += "在这三个方面，是强项指标。"
            // 二级指标文字描述
            Object.keys(secondLevelList).forEach(key => {
                // 查找对应的指标信息
                const indicatorInfo = Evaluation.find(info => info.treeCode === key);
                switch (indicatorInfo.category) {
                    case "德育":
                        app.strengthContent.DY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "智育":
                        app.strengthContent.ZY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "体育":
                        app.strengthContent.TY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "美育":
                        app.strengthContent.MY.secondshort += indicatorInfo.description + "  "
                        break;
                    case "劳育":
                        app.strengthContent.LY.secondshort += indicatorInfo.description + "  "
                        break;
                }
            })
            // 三级指标文字描述
            Object.keys(thirdLevelList).forEach(key => {
                // console.log(key)
                // 查找对应的指标信息
                const indicatorInfo = Evaluation.find(info => info.treeCode === key);
                switch (indicatorInfo.category) {
                    case "德育":
                        app.strengthContent.DY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "智育":
                        app.strengthContent.ZY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "体育":
                        app.strengthContent.TY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "美育":
                        app.strengthContent.MY.thirdshort += indicatorInfo.description + "  "
                        break;
                    case "劳育":
                        app.strengthContent.LY.thirdshort += indicatorInfo.description + "  "
                        break;
                }
            })
        }
        // 请求数据
        getScoreList()


    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.2/html2pdf.bundle.js"></script>
    <script>
        // 生成pdf
        function downloadpdf() {
            const content = document.getElementById("show");

            const opt = {
                margin: 10, // 设置边距，单位为毫米
                filename: 'sample.pdf', // 设置文件名
                image: { type: 'jpeg', quality: 0.98 },
                html2canvas: { dpi: 192, letterRendering: true },
                jsPDF: {
                    unit: 'mm',  // 单位为毫米
                    format: [400,400], // 设置页面格式，a4、letter 等
                    orientation: 'landscape', // 设置页面方向，portrait 或 landscape
                    scale: 0.8  // 设置缩放比例，0.8 为 80% 的缩放
                }
            };

            html2pdf()
                .from(content)   // 从 content 元素导出 PDF
                .set(opt)         // 设置配置选项
                .outputPdf('blob') // 输出为 Blob
                .then(function (blob) {
                    const pdfUrl = URL.createObjectURL(blob);
                    window.open(pdfUrl); // 在新窗口打开 PDF
                });
        }
    </script>

</html>

<!-- 

让我们重新审视。我们将：
数据库里面仅有对于三级指标点如1.1.1的记录数据 , 而没有其他指标的数据。
从数据库取出21008038同学所在年级的全部分数
1. 计算21008038同学的三级指标点的Z分数 : 公式为 (Z分数 = (Z分数 - 平均值) / 标准差)平均值和标准差是某个三级指标下所有成绩的均值和标准差。
2. 计算二级指标如1.1的Z分数：是根据下面的三级指标的Z分数的加权平均数 (Z分数 * 权重) / 权重系数和
3. 计算一级指标如1的Z分数：是根据下面的二级指标的加权平均数 (Z分数 * 权重) / 权重系数和
4. 计算总分：根据一级指标的加权平均数 (Z分数 * 权重) / 权重系数和

-->